<template>
  <div>
    <van-goods-action>
      <van-goods-action-icon icon="star-o" text="未收藏"/>
      <van-goods-action-icon icon="cart-o" text="购物车" :badge="badge"/>
      <van-goods-action-button type="warning" @click="addToCart" text="加入购物车"/>
      <van-goods-action-button type="danger" text="立即购买"/>
    </van-goods-action>
  </div>
</template>

<script>
import {getCartNum} from "@/request/api";

export default {
  name: "GoodsTabBar",
  props:['badge'],
  methods: {
    addToCart(){
      this.$emit('addToCart')
    }
  },
  created() {
  }
}
</script>

<style scoped>
.van-goods-action {
  z-index: 9999;
}
</style>